package com.lab.schemeurl.constant;

/**
 * Created by ak
 */
public enum Scheme {

    CUITRIP("cuitrip"),
    HTTP("http"),
    HTTPS("https");

    private String mSchemeName;

    Scheme(String schemeName) {
        this.mSchemeName = schemeName;
    }

    public String getSchemeName() {
        return this.mSchemeName;
    }

    public static Scheme getSchemeByName(String name) {
        if (null != name) {
            for (Scheme scheme : Scheme.values()) {
                if (scheme.getSchemeName().equals(name)) {
                    return scheme;
                }
            }
        }
        return null;
    }

}
